// 跳转时验证登录
const toLogin = (source) => {
    uni.navigateTo({
        url: "/pages/login/login?source="+source
    })
}
export function navigateTo(url,source="") {
    if (uni.getStorageSync('userInfo')) {
        uni.navigateTo({
            url
        })
    } else {
        uni.showModal({
            title: "您还未登录",
            content: "是否跳转到登录页面",
            success(res) {
                if (res.confirm) {
                    toLogin(source);
                }
                
            }
        })
        
    }
}